//Wrapper for EE::Display
#pragma once
#include "stdafx.h"

namespace EsenthelNet
{
	public ref class DisplayDraw {
	public:
		///<summary>Get/Set draw scale, default=1</summary>
		PropMet(float, Scale, D.scale)

		///<summary>Draw dot</summary>
		void DrawDot(EsenthelNet::Color^ color, EsenthelNet::Vec^ v) { D.dot(*color->color, *v->vec); }
		///<summary>Draw dot</summary>
		void DrawDot(EsenthelNet::Color^ color, EsenthelNet::Vec^ v, float radius) { D.dot(*color->color, *v->vec, radius); }
		///<summary>Draw dot with perspective, size depending on distance to camera</summary>
		void DrawDotP(EsenthelNet::Color^ color, EsenthelNet::Vec^ v) { D.dotP(*color->color, *v->vec); }
		///<summary>Draw dot with perspective, size depending on distance to camera</summary>
		void DrawDotP(EsenthelNet::Color^ color, EsenthelNet::Vec^ v, float radius) { D.dotP(*color->color, *v->vec, radius); }

		///<summary>Draw filled rectangle</summary>
		void DrawRect(EsenthelNet::Color^ color, float x0, float y0, float x1, float y1) { D.rect(*color->color, x0, y0, x1, y1); }

		///<summary>draw non-filled rectangle (lines only)</summary>
		void DrawRectL(EsenthelNet::Color^ color, float x0, float y0, float x1, float y1) { D.rectL(*color->color, x0, y0, x1, y1); }

		///<summary>Draw non-filled rectangle (with fat borders)</summary>
		void DrawRectBorder(EsenthelNet::Color^ color, float border, float x0, float y0, float x1, float y1) { D.rectBorder(*color->color, border, x0, y0, x1, y1); }

		///<summary>Draw shaded rectangle; shade horizontally</summary>
		void DrawRectShadedX(EsenthelNet::Color^ color0, EsenthelNet::Color^ color1, float x0, float y0, float x1, float y1) { D.rectShadedX(*color0->color, *color1->color, x0, y0, x1, y1); }
		///<summary>Draw shaded rectangle; shade vertically</summary>
		void DrawRectShadedY(EsenthelNet::Color^ color0, EsenthelNet::Color^ color1, float x0, float y0, float x1, float y1) { D.rectShadedY(*color0->color, *color1->color, x0, y0, x1, y1); }
		///<summary>Draw shaded rectangle; shade inside and outside</summary>
		void DrawRectShaded(EsenthelNet::Color^ color0, EsenthelNet::Color^ color1, float width, float x0, float y0, float x1, float y1) { D.rectShaded(*color0->color, *color1->color, width, x0, y0, x1, y1); }


		///<summary>Draw filled circle</summary>
		void DrawCircle(EsenthelNet::Color^ color, float radius, float x, float y) { D.circle(*color->color, radius, x, y); }
		///<summary>Draw filled circle</summary>
		void DrawCircleL(EsenthelNet::Color^ color, float radius, float x, float y) { D.circL(*color->color, radius, x, y); }

		///<summary>Draw line</summary>
		void DrawLine(EsenthelNet::Color^ color, float x0, float y0, float x1, float y1) { D.line(*color->color, x0, y0, x1, y1); }
		///<summary>Draw line</summary>
		void DrawLine(EsenthelNet::Color^ color, EsenthelNet::Vec^ a, EsenthelNet::Vec^ b) { D.line(*color->color, *a->vec, *b->vec); }

		///<summary>draw horizontal line</summary>
		void DrawLineX(EsenthelNet::Color^ color, float y, float x0,  float x1) { D.lineX(*color->color, y, x0, x1); }
		///<summary>Draw vertical line</summary>
		void DrawLineY(EsenthelNet::Color^ color, float x, float y0,  float y1) { D.lineY(*color->color, x, y0, y1); }

		///<summary>Begin drawing a backbuffer effect, by calling this method you're activating drawing to the  backbuffer, 'clear'=if set to true then the backbuffer will be cleared to transparent color at start, if set to false the backbuffer will contain a copy of the current frontbuffers data</summary>
		void FxBegin(bool clear) { D.fxBegin(clear); }
		///<summary>End drawing a backbuffer effect, by calling this method you're restoring  drawing to the frontbuffer, created backbuffer data should be applied using other functions</summary>
		void FxEnd() { D.fxEnd(); }


		void Text(float x, float y, System::String^ text) { D.text(x, y, ToEEStr(text)); }

	};
}